home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Xi / XGetDeviceMotionEvents.z / XGetDeviceMotionEvents
Encoding:
Text File  |  2002-10-03  |  6.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XGetDeviceMotionEvents, XDeviceTimeCoord - get device motion
  10.           history
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           XDeviceTimeCoord *XGetDeviceMotionEvents(_d_i_s_p_l_a_y, _d_e_v_i_c_e,
  14.           _s_t_a_r_t, _s_t_o_p,
  15.           _n_e_v_e_n_t_s__r_e_t_u_r_n, _m_o_d_e__r_e_t_u_r_n, _a_x_i_s__c_o_u_n_t__r_e_t_u_r_n)
  16.                 Display *_d_i_s_p_l_a_y;
  17.                 XDevice *_d_e_v_i_c_e;
  18.                 Time _s_t_a_r_t, _s_t_o_p;
  19.                 int *_n_e_v_e_n_t_s__r_e_t_u_r_n;
  20.                 int *_m_o_d_e__r_e_t_u_r_n;
  21.                 int *_a_x_i_s__c_o_u_n_t__r_e_t_u_r_n;
  22.  
  23.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  24.           _d_i_s_p_l_a_y     Specifies the connection to the X server.
  25.  
  26.           _d_e_v_i_c_e      Specifies the device whose motion history is to
  27.                       be queried.
  28.  
  29.           _s_t_a_r_t
  30.           _s_t_o_p        Specify the time interval in which the events
  31.                       are returned from the motion history buffer.
  32.                       You can pass a timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  33.  
  34.           _n_e_v_e_n_t_s__r_e_t_u_r_n
  35.                       Returns the number of events from the motion
  36.                       history buffer.
  37.  
  38.           _m_o_d_e__r_e_t_u_r_n Returns the mode of the device (_A_b_s_o_l_u_t_e or
  39.                       _R_e_l_a_t_i_v_e).
  40.  
  41.           _a_x_i_s__c_o_u_n_t__r_e_t_u_r_n
  42.                       Returns the count of axes being reported.
  43.  
  44.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  45.           The server may retain the recent history of the device
  46.           motion and do so to a finer granularity than is reported by
  47.           _D_e_v_i_c_e_M_o_t_i_o_n_N_o_t_i_f_y events.  The _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s
  48.           request makes this history available.
  49.  
  50.           The _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s request returns all events in the
  51.           motion history buffer that fall between the specified start
  52.           and stop times, inclusive.  If the start time is later than
  53.           the stop time or if the start time is in the future, no
  54.           events are returned.  If the stop time is in the future, it
  55.           is equivalent to specifying _C_u_r_r_e_n_t_T_i_m_e.
  56.  
  57.           The _m_o_d_e indicates whether the device is reporting absolute
  58.           positional data (mode=_A_b_s_o_l_u_t_e) or relative motion data
  59.           (mode=_R_e_l_a_t_i_v_e).  Some devices allow their mode to be
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           changed via the _X_S_e_t_D_e_v_i_c_e_M_o_d_e request.  These constants are
  75.           defined in the file XI.h.  The _a_x_i_s__c_o_u_n_t returns the number
  76.           of axes or valuators being reported by the device.
  77.  
  78.           _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s can generate a _B_a_d_D_e_v_i_c_e, or _B_a_d_M_a_t_c_h
  79.           error.
  80.  
  81.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  82.           The _X_D_e_v_i_c_e_T_i_m_e_C_o_o_r_d structure contains:
  83.  
  84.           typedef struct {
  85.                Time time;
  86.                int *data;
  87.           } XDeviceTimeCoord;
  88.  
  89.           The time member is set to the time, in milliseconds. The
  90.           data member is a pointer to an array of integers. These
  91.           integers are set to the values of each valuator or axis
  92.           reported by the device.  There is one element in the array
  93.           per axis of motion reported by the device.  The value of the
  94.           array elements depends on the mode of the device.  If the
  95.           mode is _A_b_s_o_l_u_t_e, the values are the raw values generated by
  96.           the device.  These may be scaled by client programs using
  97.           the maximum values that the device can generate.  The
  98.           maximum value for each axis of the device is reported in the
  99.           max_val field of the _X_A_x_i_s_I_n_f_o returned by the
  100.           _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s request.  If the mode is _R_e_l_a_t_i_v_e, the
  101.           data values are the relative values generated by the device.
  102.  
  103.           You should use _X_F_r_e_e_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s to free the data
  104.           returned by this request.
  105.  
  106.           Errors returned by this request: _B_a_d_D_e_v_i_c_e, _B_a_d_M_a_t_c_h.
  107.  
  108.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  109.           _B_a_d_D_e_v_i_c_e   An invalid device was specified.  The specified
  110.                       device does not exist or has not been opened by
  111.                       this client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.  This error
  112.                       may also occur if the specified device is the X
  113.                       keyboard or X pointer device.
  114.  
  115.           _B_a_d_M_a_t_c_h    This error may occur if an
  116.                       _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s request is made
  117.                       specifying a device that has no valuators and
  118.                       reports no axes of motion.
  119.  
  120.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  121.           _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.